﻿using System;

namespace Teigha.Core
{
	public class OdGiMaterialItem_Internal : OdGiMaterialItem
	{
		public OdGiMaterialItem_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override OdGiMaterialTextureEntry diffuseTexture()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiMaterialItem_diffuseTexture__SWIG_0(OdGiMaterialItem.getCPtr(this));
			OdGiMaterialTextureEntry result = new OdGiMaterialTextureEntry(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGiMaterialTextureEntry createDiffuseTexture()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiMaterialItem_createDiffuseTexture(OdGiMaterialItem.getCPtr(this));
			OdGiMaterialTextureEntry result = new OdGiMaterialTextureEntry(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void removeDiffuseTexture()
		{
			GlobalsPINVOKE.OdGiMaterialItem_removeDiffuseTexture(OdGiMaterialItem.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override bool haveDiffuseTexture()
		{
			bool result = GlobalsPINVOKE.OdGiMaterialItem_haveDiffuseTexture(OdGiMaterialItem.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdRxObject cachedData()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiMaterialItem_cachedData(OdGiMaterialItem.getCPtr(this));
			OdRxObject result = new OdRxObject(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setCachedData(OdRxObject data)
		{
			GlobalsPINVOKE.OdGiMaterialItem_setCachedData(OdGiMaterialItem.getCPtr(this), OdRxObject.getCPtr(data));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdDbStub materialId()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiMaterialItem_materialId(OdGiMaterialItem.getCPtr(this));
			OdDbStub result = new OdDbStub(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setMaterialId(OdDbStub matId)
		{
			GlobalsPINVOKE.OdGiMaterialItem_setMaterialId__SWIG_0(OdGiMaterialItem.getCPtr(this), OdDbStub.getCPtr(matId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void setMaterialId()
		{
			GlobalsPINVOKE.OdGiMaterialItem_setMaterialId__SWIG_1(OdGiMaterialItem.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override bool isMaterialIdValid(OdDbStub matId)
		{
			bool result = GlobalsPINVOKE.OdGiMaterialItem_isMaterialIdValid(OdGiMaterialItem.getCPtr(this), OdDbStub.getCPtr(matId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}
	}
}
